Otherwise, build depends on WITH_WAYLAND also being enabled or else
fails without Qt6::GuiPrivate.
Amends
344679d5aa2e1f0aa27f63be59dade3be2b7f651
See also: https://bugs.gentoo.org/970127
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Gbp-Pq: Name upstream_CMake-Find-Qt6-GuiPrivate-when-USE_DBUS-is-enabled.patch
option(USE_DBUS "Build components using DBus (get color scheme information via XDG portals)" ${USE_DBUS_DEFAULT})
if(USE_DBUS)
find_package(Qt6DBus ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
+ if (Qt6Gui_VERSION VERSION_GREATER_EQUAL "6.10.0")
+ find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
+ else()
+ find_package(Qt6Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Private)
+ endif()
set(WITH_DBUS ON)
endif()
colors/kcolorschemewatcher_xdg.cpp
util/ksysteminhibitor_dbus.cpp
)
- target_link_libraries(KF6GuiAddons PRIVATE Qt6::DBus)
+ target_link_libraries(KF6GuiAddons PRIVATE Qt6::DBus Qt6::GuiPrivate)
target_compile_definitions(KF6GuiAddons PRIVATE WITH_DBUS)
endif()